/***************************************************************************
 *            objects_manager.h
 *
 *  Wed Sep 17 22:45:09 2008
 *  Copyright  2008  Tiago Falcão
 *  <developer@tiagofalcao.com>
 ****************************************************************************/

/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Library General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
 */
 
#ifndef OBJECTS_3D_H
#define OBJECTS_3D_H

#include "object.h"
#include "menu.h"

typedef struct objects_manager{
	object ** objs;				// Vetor de Ponteiros para Objetos
	unsigned int objs_qtd;		// Quantidade de Objetos
	object * selected;			// Ponteiro para Objeto Selecionado
	unsigned int selected_index;// Indice do Objeto Selecionado
} objects_manager;

//Cria Estrutura
objects_manager * objects_manager_create();

//Deleta Estrutura
void objects_manager_delete(objects_manager * objs);

//Display Objetos da Lista
void objects_manager_display(objects_manager * objs);

//Adiciona Objeto a Lista
object * objects_manager_add(objects_manager * objs,void (*display)(void *,object *), void * object,void (*object_delete)(void *));

//Deleta Objeto Marcado
void objects_manager_delete_selected(objects_manager * objs);

//Desmarca o Objeto Marcardo atual
void objects_manager_unselect(objects_manager * objs);

//Seleciona Objeto pelo Indice
void objects_manager_select(objects_manager * objs, int index);

//Seleciona Proximo Objeto da Lista
void objects_manager_select_next(objects_manager * objs);

//Seleciona Objeto Anterior da Lista
void objects_manager_select_prev(objects_manager * objs);

#endif /* OBJECTS_3D_H */

